// SettingDlg.cpp : implementation file
//

#include "stdafx.h"
#include "kquick.h"
#include "SettingDlg.h"


// CSettingDlg dialog

IMPLEMENT_DYNAMIC(CSettingDlg, CDialog)

CSettingDlg::CSettingDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSettingDlg::IDD, pParent)
{

}

CSettingDlg::~CSettingDlg()
{
}

void CSettingDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CSettingDlg, CDialog)
	ON_BN_CLICKED(IDOK, &CSettingDlg::OnBnClickedOk)
END_MESSAGE_MAP()


// CSettingDlg message handlers
// CCmdDlg message handlers
BOOL CSettingDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	HWND hwnd = ::GetForegroundWindow();
	if (AttachThreadInput(GetWindowThreadProcessId(hwnd, NULL), GetCurrentThreadId(), TRUE) == TRUE) {
		SetForegroundWindow();
		SetFocus();

		AttachThreadInput(GetWindowThreadProcessId(hwnd, NULL), GetCurrentThreadId(), FALSE);
	}

	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CSettingDlg::OnBnClickedOk()
{
	// TODO: Add your control notification handler code here

	GetDlgItemText(IDC_EDIT1, m_cmd);
	OnOK();
}
